/* 设置背景 */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: radial-gradient(circle, #d20000, #a10000, #700000);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  color: #fff;
  overflow: hidden;
}

/* 中央容器 */
.container {
  text-align: center;
  position: absolute;
  z-index: 10;
  animation: fadeIn 2s ease-in-out;
}

/* 主标题样式 */
h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #ffd700; /* 金黄色 */
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7), 0px 0px 15px #ff4500;
}

/* 副标题样式 */
p {
  font-size: 1.8rem;
  line-height: 1.8;
  color: #fff5e1; /* 柔和的白色 */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* 烟花画布 */
.fireworks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 烟花爆炸效果 */
@keyframes fireworks {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(2) rotate(180deg);
    opacity: 0.7;
  }
  100% {
    transform: scale(4) rotate(360deg);
    opacity: 0;
  }
}

/* 更新烟花颜色和形状，采用放射状的线条效果 */
.firework {
  position: absolute;
  width: 2px;
  height: 20px;
  background: inherit;
  opacity: 0;
  animation: fireworks 1.5s ease-out infinite;
  transform-origin: center;
  /* 创建放射状的效果，通过变换旋转和缩放 */
  transform: rotate(45deg);
}

/* 金色烟花 */
.firework1 {
  background: linear-gradient(45deg, #ffcc00, #ff6600);
  animation: fireworks 1.5s ease-out infinite;
}

/* 红色烟花 */
.firework2 {
  background: linear-gradient(45deg, #ff0000, #800000);
  animation: fireworks 1.5s ease-out infinite;
}

/* 绿色烟花 */
.firework3 {
  background: linear-gradient(45deg, #00ff00, #006400);
  animation: fireworks 1.5s ease-out infinite;
}

/* 蓝色烟花 */
.firework4 {
  background: linear-gradient(45deg, #0000ff, #00008b);
  animation: fireworks 1.5s ease-out infinite;
}

/* 通过 CSS 伪元素增加更多的放射状线条 */
.firework::before, .firework::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 20px;
  background: inherit;
  animation: fireworks 1.5s ease-out infinite;
  transform-origin: center;
  transform: rotate(-45deg);
}

.firework1::before, .firework1::after {
  background: linear-gradient(45deg, #ffcc00, #ff6600);
}

.firework2::before, .firework2::after {
  background: linear-gradient(45deg, #ff0000, #800000);
}

.firework3::before, .firework3::after {
  background: linear-gradient(45deg, #00ff00, #006400);
}

.firework4::before, .firework4::after {
  background: linear-gradient(45deg, #0000ff, #00008b);
}

/* 淡入效果 */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
